EMT Practice Test

1. Question Content...


Question List

Question1: Which script will display Configurations, you won! In the browser when the script is run?
A)

B)

C)

D)

Question2: Consider the following code:

What change should be made to ensure that it correctly displays the value of name in all uppercase letters?

Question3: What is the best practice for testing code to pinpoint a logic error within a script?

Question4: Consider the following code:

What is the result if this code is run in a browser?

Question5: Which of the following is an advantage of using the Virtual DOM?

Question6: Consider the following code:

What text will display in the alert dialog box?

Question7: Juan is testing his JavaScript application, which includes the following code:

Assuming Juan enters August for his birth month and his name for first name, what is the value of birthMonth after executing this code?

Question8: What is the expected result of executing the following code block in a Web browser?

Question9: Consider the following code.

Which of the following will occur if the user's response is 25?

Question10: Consider the following two code segments:

Which of the following is true about these code segments?

Question11: Scarlet has the following code in her script:
Var namesArr =[''Joseph',' Charlotte'', ''Nicole''];
She wants to add the name Hank to the end of the array so that its length is 4. What code should she use?

Question12: How does AJAX use the XMLHttpRequest object"?

Question13: Consider the following code:

The JavaScript function above will display the following:

Question14: Which code could be used to send a user to another Web site when they click a button on the Web page?
A)

B)

C)

D)

Question15: Geraldine is creating a custom object to store user account data on her Web site. She has written the following code it is not working properly. What change should she make to enable the script to run correctly?

Question16: Consider the following code:

What does line 9 do?

Question17: Marshall's computer previously contracted malware because he unknowingly clicked on an infected link in a pop-up window. What can he do to secure the Web browser so that he is protected in the future?

Question18: Geraldine is creating a custom object to store user account data on her Web site. She has written the following code it is not working properly. What change should she make to enable the script to run correctly?

Question19: Consider the following code:

The processform() function is not executed when the submit button is pressed. What change should be made to correct this?

Question20: Consider the following code:

What is the result if this code is run in a browser?

Question21: Which of the following comparison statement will return true?
A)
X=10;
Y=11;
y--;
x==y
B)
X=10;
Y=11;
Y++;
x==y'
C)
X=11;
Y=10;
y--;
x==y;
D)
X=11;
Y=10;
y-= 1;
x==y

Question22: Consider the following code:

What change should be made to ensure that it correctly displays the value of name in all uppercase letters?

Question23: Consider the following code:

Charies wants to write code to execute the changeOption function after the user chooses an option in the select menu. What change to the code should he make?

Question24: Consider the following code:

What will this alert display?

Question25: Consider this source code:

Giam needs to write a script to access the first element in the source code. What code should he use?

Question26: Consider the following code:

What code would you use to determine if the check box has been checked or not?

Question27: Consider the following code:
<img onmousout=" sofaPic (this) " src="sofa.jpg" alt="sofa">
Which of the following is true based on the above code?

Question28: Consider the following code:

What is the result of running this script in a Web browser?

Question29: Jackson was testing his code when the Web browser became locked and he had to close it to stop the script What might he have accidentally done when coding his Web site?

Question30: Which of the following statements is an advantage of using JavaScript on the server-side?

Question31: Loni needs to create a scriptable button in her Web form that does not submit the form but instead, calls a custom function What HTML code should she use?
A)

B)

C)

D)

Question32: Jaime needs to write a script to remove all the non-digit characters from a phone number so that all that remains are the numbers She knows that she will need to use a regular expression to search for non-digit characters and can use a method to remove all the non-digit characters. Which code should she use?
A)

B)

C)

D)

Question33: Which of the following best describes how JavaScript communicates with databases when used with AJAX?